from common.config import yawConfig as Config
# from yawSrc.tools.loadFile import loadfile, toAttrCsv
from yawSrc.tools.loadFile import toAttrCsv
from toolsSrc.files.loadFiles import loadfile


# @CleanDecorator.drop_duplicates
# @CleanDecorator.drop_bigorsmall
#@CleanDecorator.drop_dbscan
def initDataProcess(X):
    return X


def toCsv():
    columsList = [Config.WindSpeed, Config.ActPower, Config.WindDirection]
    X = loadfile(Config.historyDataRoot, columsList)  # 读取Cofnig.historyDataRoot目录下的所有数据文件
    X = X[columsList]
    X.to_csv(Config.hisInitialData, index=False)

if __name__ == '__main__':
    toCsv()
    toAttrCsv(Config.hisInitialData, Config.hisInitialDataAttr)
    print('initialDataProcess 完毕................')